<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>账户登录</title>
    <style>
        :root {
            --primary: #165DFF;
            --primary-light: rgba(22, 93, 255, 0.1);
            --primary-dark: #0E42D2;
            --text-primary: #1D2129;
            --text-secondary: #4E5969;
            --text-placeholder: #86909C;
            --border: #DCE0E6;
            --border-focus: rgba(22, 93, 255, 0.3);
            --white: #FFFFFF;
            --bg-gray: #F2F3F5;
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
            --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
        }

        body {
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: var(--bg-gray);
            padding: 20px;
            overflow-x: hidden;
            position: relative;
        }

        /* 高级背景效果 */
        .background {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: 0;
        }

        .bg-pattern {
            position: absolute;
            width: 100%;
            height: 100%;
            background-image:
                    radial-gradient(circle at 25% 25%, rgba(22, 93, 255, 0.03) 0%, transparent 40%),
                    radial-gradient(circle at 75% 75%, rgba(22, 93, 255, 0.03) 0%, transparent 40%);
            background-size: 100% 100%;
        }

        .bg-blob {
            position: absolute;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(22, 93, 255, 0.05) 0%, transparent 70%);
            filter: blur(60px);
            animation: float 25s infinite ease-in-out;
        }

        .bg-blob:nth-child(1) {
            width: 600px;
            height: 600px;
            top: -300px;
            left: -200px;
            animation-delay: 0s;
        }

        .bg-blob:nth-child(2) {
            width: 500px;
            height: 500px;
            bottom: -250px;
            right: -150px;
            animation-delay: 8s;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-50px) rotate(5deg); }
        }

        /* 登录容器 */
        .login-container {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 420px;
            background-color: var(--white);
            border-radius: 20px;
            padding: 50px 40px;
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        .login-container:hover {
            box-shadow: var(--shadow-hover);
            transform: translateY(-2px);
        }

        /* 品牌标识 */
        .brand {
            display: flex;
            justify-content: center;
            margin-bottom: 40px;
        }

        .brand-logo {
            width: 50px;
            height: 50px;
            background-color: var(--primary);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            font-weight: bold;
            box-shadow: 0 4px 15px rgba(22, 93, 255, 0.2);
        }

        /* 标题样式 */
        .login-title {
            text-align: center;
            margin-bottom: 8px;
            color: var(--text-primary);
            font-size: 26px;
            font-weight: 600;
        }

        .login-subtitle {
            text-align: center;
            margin-bottom: 35px;
            color: var(--text-secondary);
            font-size: 15px;
            font-weight: 400;
        }

        /* 表单样式 */
        .form-group {
            margin-bottom: 22px;
            position: relative;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 500;
            transition: var(--transition);
        }

        .form-control {
            width: 100%;
            height: 50px;
            padding: 0 16px 0 44px;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-size: 15px;
            color: var(--text-primary);
            background-color: transparent;
            transition: var(--transition);
        }

        .form-control:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 4px var(--border-focus);
        }

        .form-control::placeholder {
            color: var(--text-placeholder);
            transition: var(--transition);
        }

        .form-control:focus::placeholder {
            color: transparent;
        }

        .form-icon {
            position: absolute;
            left: 16px;
            top: 38px;
            color: var(--text-placeholder);
            transition: var(--transition);
            width: 18px;
            height: 18px;
        }

        .form-control:focus + .form-icon {
            color: var(--primary);
        }

        /* 选项区域 */
        .form-options {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            font-size: 14px;
        }

        .remember-me {
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--text-secondary);
            cursor: pointer;
        }

        .custom-checkbox {
            width: 16px;
            height: 16px;
            border-radius: 4px;
            border: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
        }

        .custom-checkbox.checked {
            background-color: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        .forgot-password {
            color: var(--primary);
            text-decoration: none;
            transition: var(--transition);
        }

        .forgot-password:hover {
            color: var(--primary-dark);
            text-decoration: underline;
        }

        /* 按钮样式 */
        .btn-login {
            width: 100%;
            height: 50px;
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }

        .btn-login:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(22, 93, 255, 0.2);
        }

        .btn-login::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.6s ease, height 0.6s ease;
        }

        .btn-login:hover::after {
            width: 300px;
            height: 300px;
        }

        /* 分隔线 */
        .separator {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 30px 0;
        }

        .separator-line {
            flex: 1;
            height: 1px;
            background-color: var(--border);
        }

        .separator-text {
            font-size: 13px;
            color: var(--text-placeholder);
            white-space: nowrap;
        }

        /* 社交登录 */
        .social-login {
            display: flex;
            gap: 12px;
            margin-bottom: 30px;
        }

        .social-btn {
            flex: 1;
            height: 46px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background-color: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition);
        }

        .social-btn:hover {
            border-color: var(--primary);
            background-color: var(--primary-light);
            transform: translateY(-2px);
        }

        .social-icon {
            width: 20px;
            height: 20px;
        }

        /* 注册提示 */
        .register-prompt {
            text-align: center;
            font-size: 14px;
            color: var(--text-secondary);
        }

        .register-link {
            color: var(--primary);
            font-weight: 500;
            text-decoration: none;
            transition: var(--transition);
        }

        .register-link:hover {
            color: var(--primary-dark);
            text-decoration: underline;
        }

        /* 响应式调整 */
        @media (max-width: 480px) {
            .login-container {
                padding: 40px 24px;
            }

            .social-login {
                flex-direction: column;
            }
        }
    </style>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
<!-- 背景效果 -->
<div class="background">
    <div class="bg-pattern"></div>
    <div class="bg-blob"></div>
    <div class="bg-blob"></div>
</div>

<!-- 登录容器 -->
<div class="login-container">
    <div class="brand">
        <div class="brand-logo">A</div>
    </div>

    <h2 class="login-title">欢迎回来</h2>
    <p class="login-subtitle">请登录您的账户继续访问</p>

    <form id="loginForm">
        <div class="form-group">
            <label for="username" class="form-label">用户名</label>
            <input type="text" id="username" class="form-control" placeholder="请输入用户名" required>
            <i class="fas fa-user form-icon"></i>
        </div>

        <div class="form-group">
            <label for="password" class="form-label">密码</label>
            <input type="password" id="password" class="form-control" placeholder="请输入密码" required>
            <i class="fas fa-lock form-icon"></i>
        </div>

        <div class="form-options">
            <label class="remember-me">
                <div class="custom-checkbox" id="rememberCheckbox">
                    <i class="fas fa-check" style="font-size: 12px; display: none;"></i>
                </div>
                记住我
            </label>
            <a href="#" class="forgot-password">忘记密码?</a>
        </div>

        <button type="submit" class="btn-login">登录</button>

        <div class="separator">
            <div class="separator-line"></div>
            <div class="separator-text">其他登录方式</div>
            <div class="separator-line"></div>
        </div>

        <div class="social-login">
            <button type="button" class="social-btn">
                <i class="fab fa-weixin social-icon"></i>
            </button>
            <button type="button" class="social-btn">
                <i class="fab fa-qq social-icon"></i>
            </button>
            <button type="button" class="social-btn">
                <i class="fab fa-google social-icon"></i>
            </button>
        </div>

        <p class="register-prompt">
            还没有账户? <a href="#" class="register-link">立即注册</a>
        </p>
    </form>
</div>

<script>
    // 记住我复选框功能
    const rememberCheckbox = document.getElementById('rememberCheckbox');
    rememberCheckbox.addEventListener('click', function() {
        const checkIcon = this.querySelector('i');
        this.classList.toggle('checked');
        checkIcon.style.display = this.classList.contains('checked') ? 'block' : 'none';
    });

    // 登录表单处理
    document.getElementById('loginForm').addEventListener('submit', function(e) {
        e.preventDefault();

        const username = document.getElementById('username').value;
        const password = document.getElementById('password').value;

        // 模拟登录处理
        if (username && password) {
            // 显示登录加载状态
            const loginBtn = this.querySelector('.btn-login');
            const originalText = loginBtn.textContent;
            loginBtn.disabled = true;
            loginBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 登录中...';

            // 模拟API请求延迟
            setTimeout(() => {
                alert(`登录成功！\n用户名: ${username}`);
                loginBtn.disabled = false;
                loginBtn.textContent = originalText;

                // 实际应用中，这里会跳转到主页
                // window.location.href = 'dashboard.html';
            }, 1500);
        } else {
            alert('请输入用户名和密码');
        }
    });

    // 社交登录按钮效果
    const socialBtns = document.querySelectorAll('.social-btn');
    socialBtns.forEach(btn => {
        btn.addEventListener('click', function() {
            const platform = this.querySelector('.social-icon').classList[1].split('-')[1];
            alert(`即将通过${platform}登录`);
        });
    });

    // 输入框动画效果
    const inputs = document.querySelectorAll('.form-control');
    inputs.forEach(input => {
        input.addEventListener('focus', function() {
            this.parentElement.querySelector('.form-label').style.color = 'var(--primary)';
            this.parentElement.querySelector('.form-label').style.fontWeight = '500';
        });

        input.addEventListener('blur', function() {
            if (!this.value) {
                this.parentElement.querySelector('.form-label').style.color = 'var(--text-secondary)';
                this.parentElement.querySelector('.form-label').style.fontWeight = '400';
            }
        });
    });
</script>
</body>
</html>
